package jtk.project4.fleet.field;

import java.awt.FlowLayout;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ComboField;
import nl.coderight.jazz.form.field.TableField;
import nl.coderight.jazz.form.field.TableField.AutoResizeMode;
import nl.coderight.jazz.form.field.button.CheckButton;
import nl.coderight.jazz.form.field.button.PushButton;
import nl.coderight.jazz.form.field.button.RadioButton;

public class InventoryViewOptionsField extends GroupControl{
	private RadioButton viewAllPartsRadioButton;
	private RadioButton viewNeedRadioButton;
	private CheckButton viewHighlightCheckButton;
	private CheckButton viewHighlightPoCheckButton;
	
	public InventoryViewOptionsField(String bindID){
		setTitle("View Options");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	private void createFields(){
			viewAllPartsRadioButton = new RadioButton("All Parts");
			viewNeedRadioButton = new RadioButton("Need To reorder");
			viewHighlightCheckButton = new CheckButton("Highlights parts that needs to be reordered");
			viewHighlightPoCheckButton = new CheckButton ("Highlights parts assigned to PO "); 
	}
/*	
	private GroupControl viewRadButtons(){
		GroupControl rad = new GroupControl();
		rad.setLayout(new FlowLayout(FlowLayout.LEFT));
		addField(viewAllPartsRadioButton);
		addField(viewNeedRadioButton);
		return rad;
	}
	
	
	private GroupControl viewCheckButtons(){
		GroupControl chck = new GroupControl();
		chck.setLayout(new FlowLayout(FlowLayout.LEFT));
		addField(viewHighlightCheckButton);
		addField(viewHighlightPoCheckButton);
		return chck;
	}
	
	*/
	private void createLayout() {
		// TODO Auto-generated method stub
		//setTitle("View Options");
		setLayout(new FormLayout())
		.addField(viewAllPartsRadioButton)			.addField(viewHighlightCheckButton)
		.addRow()
		.addField(viewNeedRadioButton)			.addField(viewHighlightPoCheckButton)
		;	
	}

}
